//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.xyy.ec.pop.api.kingdinggmp.enums;

import java.text.MessageFormat;

public enum ApiResultCodeEum {
    SUCCESS(200, "成功"),
    NETWORK_ERROR(201, "网络异常请稍后再试！"),
    PARAMETER_ERROR(202, "入参错误"),
    AUTHORITY_ERROR(203, "鉴权异常"),
    CODE_ERROR(204, "编码异常"),
    QUERY_ERROR(205, "查询异常"),
    DATA_ANALYSIS_ERROR(206, "数据解析异常"),
    SYSTEM_ERROR(207, "系统异常"),
    PROMOTION_ERROR(2001, "促销异常"),
    PROMOTION_UNRECOGNIZED_ERROR(2002, "无法识别的状态"),
    PROMOTION_SKU_EXCEPTION(2003, "商品信息异常"),
    PROMOTION_MERCHANT_EXCEPTION(2004, "用户信息异常"),
    PROMOTION_ORDER_EXCEPTION(2005, "订单信息异常"),
    USER_QUALIFICATION_EXCEPTION(2006, "用户资质异常"),
    PROMOTION_AREA_EXCEPTION(2007, "区域异常"),
    SKU_STOCK_EXCEPTION(2008, "商品库存异常"),
    PROMOTION_NO_EXIST(2009, "活动不存在"),
    REPEAT_EXCEPTION(2010, "您提交得请求正在处理请勿重复提交"),
    PERSONAL_BUY_PROMOTIONSKU(2011, "用户商品购买数接口异常"),
    PROMOTION_CHECK_ERROR(2011, "活动校验异常"),
    PROMOTION_CHECKDATE_ERROR(2012, "校验活动日期异常"),
    CONTROL_CHECK_ERROR(2013, "控销校验异常"),
    REPEAT_DELIVERY_ERROR(2014, "重复发券"),
    REQUEST_DOING_NOREPEAT(2020, "请求处理中, 请勿重复操作，10秒之后重试!"),
    MD5_ERROR(2021, "md5异常"),
    PROMOTION_MQ_BODY_ERROR(2022, "消息实体有误，无法识别操作的类型"),
    PROMOTION_MQ_DOING_REPEAT(2023, "正在处理中的重复推送"),
    PROMOTION_MQ_KEY_ERROR(2024, "消息key和订单号都为空无法判断业务场景唯一性"),
    VOUCHER_TEMPLATE_EXCEPTION(2026, "优惠券模板异常"),
    SKU_QUANTITY_EXCEEDED(2027, "商品超出数量"),
    ACCOUNT_STATEMENT_EXCEPTION(2028, "对账单异常"),
    DELIVERY_MAX_TIMES(2029, "已达最大领取次数"),
    VOUCHER_NO_DELIVERY(2030, "不可领取"),
    VOUCHER_BAG_EXCEPTION(2031, "优惠券礼包异常"),
    VOUCHER_EXCEPTION(2032, "优惠券异常"),
    VOUCHER_DELIVERY_EXCEPTION(2033, "优惠券领取异常"),
    VOUCHER_STOCK_EXCEPTION(2034, "优惠券库存异常"),
    VOUCHER_DELIVERY_NO_START(2035, "优惠券未开始领取"),
    VOUCHER_DELIVERY_END(2036, "优惠券领取已结束"),
    VOUCHER_RECALL_EXCEPTION(2037, "优惠券召回异常"),
    VOUCHER_REVOKE_RECALL_EXCEPTION(2038, "优惠券撤销召回异常"),
    ACTIVITYPACKAGE_EXCEPTION(2039, "套餐信息异常"),
    LUCK_DRAW_USED_UP(2040, "抽奖次数已用完"),
    LUCK_DRAW_NO_HAVE(2041, "没有进行中的抽奖活动"),
    LUCK_DRAW_DOING(2042, "正在抽奖活动，请稍后再试!"),
    LUCK_DRAW_SHARE_MAX(2043, "已超过最大可获得次数"),
    OVER_PERSON_BUY_LIMIT(2044, "超出个人可购买数"),
    PROMOTION_QUERY_ERROR(2100, "query promotion Error"),
    PROMOTION_SAVE_ERROR(2101, "save promotion Error"),
    PROMOTION_UPDATE_ERROR(2102, "update promotion Error"),
    PROMOTION_DELETE_ERROR(2103, "delete promotion Error"),
    MQ_EXCEPTION(2104, "MQ异常{0}"),
    REPORT_PRICE_ERROR(2105, "提报商品优惠价格大于EC商品药帮忙价格"),
    ERROR_BUY_NUM_ADJUST(2106, "购买数量不足,{0}活动,活动id={1}"),
    SYSTEM_WILDCARD(5000, "{0}"),
    SYSTEM_WILDCARD_ILLEGAL_ARGUMENT(5001, "【非法参数】{0}"),
    SYSTEM_WILDCARD_SMS(5001, "【短信】{0}"),
    SYSTEM_WILDCARD_DOU_YA_CHANNEL(5002, "【豆芽渠道】{0}"),
    LAYOUT_WILDCARD(6000, "{0}"),
    LAYOUT_WILDCARD_ILLEGAL_ARGUMENT(6001, "【非法参数】{0}"),
    LAYOUT_WILDCARD_DATA_NOT_EXISTS(6002, "【数据不存在】{0}"),
    LAYOUT_WILDCARD_EXHIBITION_PRODUCT(6003, "【展示商品】{0}"),
    DATA_ERROR(8000, "数据服务内部异常"),
    DATA_SOURCE_REQ_TIMEOUT(8001, "请求数据源超时"),
    DATA_SOURCE_REQ_ERROR(8002, "请求数据源异常"),
    DATA_SQL_INVOKE_PARAM_ERROR(8003, "数据SQL参数错误，参数类型与参数值不匹配"),
    DATA_PARSE_ERROR(8004, "数据解析异常"),
    DATA_REQ_ES_TIMEOUT(8005, "请求ES超时"),
    DATA_REQ_ES_ERROR(8006, "请求ES异常"),
    DATA_REQ_ES_INDEX_NOT_FOUNT(8007, "请求ES索引不存在"),
    DATA_JSON_PROCESS_ERROR(8008, "数据服务JSON处理异常"),
    SEARCH_ERROR(8500, "搜索服务内部异常"),
    SEARCH_LIMIT_ERROR(8501, "搜索返回limit超过服务限制"),
    SEARCH_JSON_PROCESS_ERROR(8502, "搜索服务JSON处理异常"),
    ZHL_RELATION(9001, "未建立建采关系");

    int code;
    String msg;

    private ApiResultCodeEum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    /** @deprecated */
    @Deprecated
    public static ApiResultCodeEum formatMsg(ApiResultCodeEum codeEum, String... args) {
        codeEum.setMsg(MessageFormat.format(codeEum.getMsg(), args));
        return codeEum;
    }

    public static String formatMsgToStr(ApiResultCodeEum codeEum, String... args) {
        return MessageFormat.format(codeEum.getMsg(), args);
    }
}
